<template>
<div class="mui-numbox">
    <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
    <input class="mui-input-numbox" type="number" value="0" @change="changeVal" ref="val"/>
    <button class="mui-btn mui-btn-numbox-plus" type="button" >+</button>
</div>
</template>


<script>
export default {
   
    computed:{
        num(){
            return this.$store.state.n
        }
    },
    methods:{
        changeVal(){
          
           this.$store.commit("add",this.$refs.val.value)
        }
    }
}
</script>